package com.owen.dao;

import com.owen.pojo.Commodity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CommodityDao {

    public List<Commodity> findAll();

    public List<Commodity> findByCommodity(Commodity commodity);

    public List<Commodity> findByCommodityByFenlei(@Param("commodity") Commodity commodity, @Param("fenleiids") Long [] fenleiids);

    public Commodity findById(Integer id);

    public Integer deleteById(Integer id);

    public Integer deleteBatch(Integer [] ids);

    public Integer updateById(Commodity commodity);

    public Integer addCommodityById(Commodity commodity);

    public Integer addCommodityFenlei(@Param("commodityId") Integer commodityId, @Param("fenleiId") Integer fenleiId);

    public Integer deleteCommodityFenleiById(Integer id);

}